05. Quiz: Adding an Open Chest Animation

Adding An Open Chest Animation

QUESTION:

Now that we are able to detect the chest, we should probably do something when we detect it. Let's create an animation that opens the chest lid when the raycast hits the chest!

There are several ways of implementing this functionality, but for simplicity and to reinforce your learning, we recommend doing it in the same way you rotated the Globe in the Build an Apartment project.

Give it your best try, then write down the outline of the steps you took in the field below, and submit the quiz.

Tip: If you get stuck on the scripting part, take a look at the TriggerAnimation script you used in the Build an Apartment project and compare it to the DetectTreasure script you created in this lesson.

ANSWER:

Were you able to open the chest lid when the raycast hits the chest? If not, we recommend posting a question in Knowledge by clicking the blue lightbulb in the lower left of the classroom.